<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/oa/include/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>流程部署</title>
<link rel="stylesheet" type="text/css" href="${jsAndCss}/css/style.css" />
<link rel="stylesheet" type="text/css"
	href="${jsAndCss}/css/WdatePicker.css" />
<link rel="stylesheet" type="text/css"
	href="${jsAndCss}/css/skin_/form.css" />
<link href="${jsAndCss}/umeditor/themes/default/_css/umeditor.css"
	type="text/css" rel="stylesheet">
<script type="text/javascript" src="${jsAndCss}/js/jquery.js"></script>
<script type="text/javascript" src="${jsAndCss}/js/global.js"></script>
<script type="text/javascript" src="${jsAndCss}/js/jquery.select.js"></script>
<script type="text/javascript" src="${jsAndCss}/js/WdatePicker.js"></script>
<script type="text/javascript">
	window.UMEDITOR_HOME_URL = 'umeditor/'; // 请换成绝对路径
</script>
<script type="text/javascript" src="${jsAndCss}/js/umeditor.config.js"></script>
<script type="text/javascript" src="${jsAndCss}/js/editor_api.js"></script>
<script type="text/javascript"
	src="${jsAndCss}/umeditor/lang/zh-cn/zh-cn.js"></script>
	
<script type="text/javascript">
var complete = function(obj){
	var pOut = obj.value;    //原生js属性
	var taskId = $("#taskId").val();  //$() 这是JQuery的节点，所以要用jQuery的方法 val()
	var leaveId = $("#leaveId").val();
	var commentMsg =$("#commentMsg").val();
	$.ajax({
		type:"post",
		url:"${ctx}/leave/completeTask",
		dataType:"json",
		data:{"pOut" : pOut,"taskId":taskId,"leaveId":leaveId,"commentMsg":commentMsg},
		success:function(data){
			alert(data.resMsg);
			window.location.href="${ctx}/apply/leaveTaskList";
		}
	});
};
</script>	
</head>
<body>
  <div id="container">
	<div id="hd"></div>
	<div id="bd">
		<div id="main">
			<h2 class="subfild">
				<span>请假信息</span><a href="${ctx }/apply/leaveTaskList" style="font-size:12px">返回上一页</a>
			</h2>
			<input type="hidden" id="taskId" value="${taskId }" />
			<input type="hidden" id="leaveId" value="${leave.leaveId }" />
			<div class="subfild-content base-info">
				<form id="leaveForm" action="#" method="post">
					<div class="kv-item ue-clear time">
	                	<label><span class="impInfo">*</span>请假开始日期：</label>
	                	<div class="kv-item-content">
	                    	<input type="text" name="leaveStart" value="${leave.leaveStart }" placeholder="请假开始日期" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
	                        <i class="time-icon"></i>
	                    </div>
	                </div> 
	                <div class="kv-item ue-clear time">
	                	<label><span class="impInfo">*</span>请假结束日期：</label>
	                	<div class="kv-item-content">
	                    	<input type="text" name="leaveEnd" value="${leave.leaveEnd }" placeholder="请假结束日期" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
	                        <i class="time-icon"></i>
	                    </div>
	                </div>
					<div class="kv-item ue-clear">
						<label><span class="impInfo">*</span>请假天数</label>
						<div class="kv-item-content">
							<input type="text" name="leaveDays" value="${leave.leaveDays }" placeholder="请假天数"
								style="width: 180px" />
						</div>
						<span class="kv-item-tip"></span>
					</div>
					<div class="kv-item ue-clear">
						<label><span class="impInfo">*</span>请假原因</label>
						<div class="kv-item-content">
							<textarea placeholder="请假原因" type="text" name="leaveReason" id="" style="width:300px;height:100px;">${leave.leaveReason }</textarea>
						</div>
						<span class="kv-item-tip"></span>
					</div>
					<div class="kv-item ue-clear">
						<label><span class="impInfo">*</span>说点什么：</label>
						<div class="kv-item-content">
							<textarea placeholder="说点什么" id="commentMsg" name="commentMsg" value="" id="" style="width:300px;height:100px;"></textarea>
						</div>
						<span class="kv-item-tip"></span>
					</div>
					
					<div class="buttons">
						<c:forEach items="${btnList }" var="btn">
							<input id="btnSubmit" type="button" onclick="javascript:complete(this)" class="button" value="${btn }" />
						</c:forEach>
					</div>
					<c:forEach items="${commentList }" var="comment">
						<div>${comment.id } : ${comment.userId }</div>
						<div>${comment.time } : ${comment.message }</div>
					</c:forEach>
					
				</form>
				<!-- <div class="kv-item ue-clear time">
                	<label><span class="impInfo">*</span>发布时间</label>
                	<div class="kv-item-content">
                    	<input type="text" placeholder="文章标题" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
                        <i class="time-icon"></i>
                    </div>
                    <span class="kv-item-tip error">这是一个错误信息</span>
                </div> 
                
                <div class="kv-item ue-clear">
                	<label>所在栏目</label>
                	<div class="kv-item-content">
                    	<select>
                        	<option>新闻资讯</option>
                            <option>新闻资讯</option>
                            <option>新闻资讯</option>
                        </select>
                    </div>
                    <span class="kv-item-tip success">成功信息</span>
                </div>
                
                <div class="kv-item ue-clear">
                	<label>是否审核</label>
                	<div class="kv-item-content">
                    	<span class="choose">
                            <span class="checkboxouter">
                                <input type="radio" name="need" />
                                <span class="radio"></span>
                            </span>
                            <span class="text">是</span>
                        </span>
                    	<span class="choose">
                            <span class="checkboxouter">
                                <input type="radio" name="need" />
                                <span class="radio"></span>
                            </span>
                            <span class="text">否</span>
                        </span>
                        
                    </div>
                    <span class="kv-item-tip">标题字数限制在35个字符</span>
                </div>
                
                
                <div class="kv-item ue-clear">
                	<label><span class="impInfo">*</span>缩略图</label>
                	<div class="kv-item-content file">
						<span class="text"></span>
                        <input type="file" />
                        <input type="button" class="button normal long2" value="浏览.." />
                    </div>
                    <span class="kv-item-tip">标题字数限制在35个字符</span>
                </div>
            </div>
            
            <h2 class="subfild">
            	<span>备注资料</span>
            </h2>
            
            <div class="subfild-content remarkes-info">
            	<div class="kv-item ue-clear">
                	<label><span class="impInfo">*</span>文章内容</label>
                	<div class="kv-item-content">
                    	<textarea placeholder="文章内容" id="content" style="width:800px;height:240px;"></textarea>
                    </div>
                </div>
            </div>
            
            <div class="buttons">
                <input class="button" type="button" value="确认修改" />
            </div>-->
			</div>
		</div>
	</div>
	</body>
	<script type="text/javascript">
		$('select').select();
		showRemind('input[type=text],textarea', 'color5');
		UM.getEditor('content');
		
		
		
	</script>
</html>